<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title><%= htmlWebpackPlugin.options.title %></title>

    <script>
        if( location.href.indexOf('/wx/') > -1 ) {
            function initH5FontSize() {
                const docEl = document.documentElement,
                    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                    recalc = () => {
                        const clientWidth = docEl.clientWidth;
                        if (!clientWidth) return;
                        if(innerWidth > 750) {
                            docEl.style.fontSize = '1px';
                        } else {
                            docEl.style.fontSize = clientWidth / 750 + 'px';
                            // docEl.style.fontSize = clientWidth / 18 + 'px';
                        }
                    };
                if (!document.addEventListener) return;
                window.addEventListener(resizeEvt, recalc);
                document.addEventListener('DOMContentLoaded', recalc);
            }
            initH5FontSize()
        }
    </script>
    <script src="//api.tianditu.gov.cn/api?v=4.0&tk=518587355ab1263b30e9b2f210075468" type="text/javascript"></script>
    <script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
